<template>
  <!-- 注册页面的整体盒子 -->
  <div class="reg-container">
    <!-- 注册的盒子 -->
    <div class="reg-box">
      <!-- 标题的盒子 -->
      <div class="title-box"></div>
      <!-- 注册的表单区域 -->
      <el-form ref="form" :model="regFrom" class="from-p">
        <el-form-item prop="username">
          <el-input
            v-model="regFrom.username"
            placeholder="请输入用户名"
          ></el-input>
        </el-form-item>
        <el-form-item prop="password">
          <el-input
            v-model="regFrom.password"
            placeholder="请输入密码"
          ></el-input>
        </el-form-item>
        <el-form-item>
          <el-button class="reg-btn" type="primary">登录</el-button>
        </el-form-item>
        <el-link type="info">去注册</el-link>
      </el-form>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Reg',
  data () {
    return {
      regFrom: {
        username: '',
        password: ''
      }
    }
  }
}
</script>

<style lang="less" scoped>
.reg-container {
  background: url('../../assets/images/login_bg.jpg') center;
  background-size: cover;
  height: 100%;

  .reg-box {
    width: 400px;
    height: 335px;
    background-color: #fff;
    border-radius: 3px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    .from-p {
      padding: 0 30px;
      .reg-btn {
        width: 100%;
      }
    }

    .title-box {
      height: 60px;
      background: url('../../assets/images/login_title.png') center no-repeat;
    }
  }
}
</style>
